package com.exposit.zbs.converters;

import com.exposit.zbs.model.Comment;
import com.exposit.zbs.service.IGrantApplicationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.convert.converter.Converter;


public class StringToCommentConverter implements Converter<String, Comment> {

	@Autowired
	IGrantApplicationService grantAppService;

	@Override
	public Comment convert(String commentId) {

		Long id = new Long(commentId);
		Comment comment = grantAppService.getCommentById(id);
		return comment;
	}

}
